#导入flask
from flask import Flask
#导入配制文件
from conf.config import Config
#导入sqlalchemy
from flask_sqlalchemy import SQLAlchemy
from flask_cors import CORS, core
#实例化
db=SQLAlchemy()
#创建app方法
def create_app():
    #初始化flask
    app = Flask(__name__)
    cors=CORS(app)
    #加载配制文件
    app.config.from_object(Config)
    #db注册app
    db.init_app(app)
    return app

